/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Hunterbot;

import java.io.*;
import java.util.*;

/**
 *
 * @author mbell28
 */
public class Spell {
    
    public Spell(){
        keyBoard = new BufferedReader (new InputStreamReader (
			System.in));
    }
    
    private double reuseSpeed;
    private double castSpeed;
    private String type;
    private String name;
    private int range;
    private int damageA;
    private int damageB;
    private int id;
    private Boolean active;
    private Boolean areaEffect;
    private Boolean encoutnerEffect;
    private Boolean root;
    private Boolean encounterRoot;
    private Boolean snare;
    private Boolean mesmerize;
    private Boolean encounterMesmerize;
    private Boolean daze;
    private Boolean stun;
    private Boolean encounterStun;
    private Boolean taunt;
    private Boolean detaunt;
    private Boolean powerFeed;
    
    
    BufferedReader keyBoard;
    
    private void Input(){        
        SetDamageA();
        SetDamageB();
        SetCastSpeed();
        SetReuseSpeed();
        SetRange();
        SetName();
        SetType();
    }

    private void SetReuseSpeed(){
        System.out.println ("What is this character's reuse speed?");
        try {
            reuseSpeed = keyBoard.read();
        } catch (Exception e) {
            System.out.println(e.toString());
        }
        
    }
    
    public double GetReuseSpeed(){
        return reuseSpeed;       
    }
    
    private void SetCastSpeed(){
        System.out.println ("What is this character's casting speed?");
        try {
            castSpeed = keyBoard.read();
        } catch (Exception e) {
            System.out.println(e.toString());
        }
        
    }
    
    public double GetCastSpeed(){
        return castSpeed;
    }
    
    private void SetName(){
        System.out.println ("What is this spell's name?");
        try {
            name = keyBoard.readLine();
        } catch (Exception e) {
            System.out.println(e.toString());
        }
        
    }
    
    public String GetName(){
        return name;
    }
    
    private void SetRange(){
        System.out.println ("What is this spell's range?");
        try {
            range = keyBoard.read();
        } catch (Exception e) {
            System.out.println(e.toString());
        }
        
    }

    private void SetDamageA(){
        System.out.println ("What is this spell's minimum amount?");
        try {
            damageA = keyBoard.read();
        } catch (Exception e) {
            System.out.println(e.toString());
        }
        
    }

    private void SetDamageB(){
        System.out.println ("What is this spell's maximum amount?");
        try {
            damageB = keyBoard.read();
        } catch (Exception e) {
            System.out.println(e.toString());
        }
            
    }     
    
    private void SetType(){
        System.out.println ("Is this heal, hot, reactive, attack, debuff, ward, buff, dot, taunt, detaunt, mesmerize, encounterMesmerize, root, snare, power feed");
        try {
            type = keyBoard.readLine();            
        } 
        catch (Exception e) {
            System.out.println(e.toString());
        }
        CheckHeal();
        CheckStun();        
        if(type.contentEquals("Root")||type.contentEquals("root")){
            encounterStun = stun = mesmerize = encounterMesmerize = powerFeed = detaunt = taunt = daze = snare = false;
            root = true;
        }
        
    }
    
    private boolean CheckHeal(){
        if(type.contentEquals("heal")||type.contentEquals("Heal")||
                type.contentEquals("Hot")||type.contentEquals("hot")||
                type.contentEquals("reactive")||type.contentEquals("Reactive")) {
            powerFeed = detaunt = taunt = root = daze = stun = snare = false;
            return true;
        }
        return false;
    }
    
    private boolean CheckStun(){
        if(type.contentEquals("Stun")||type.contentEquals("stun")){
            encounterStun = mesmerize = encounterMesmerize = powerFeed = detaunt = taunt = daze = snare = false;
            stun = root = true;
            return true;
        }
        return false;
    }
}
